package co.com.inventarios.modelo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ProbodegaId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class ProbodegaId implements java.io.Serializable {

	// Fields

	private String pbdempresa;
	private String pbdproduct;
	private String pbdcuenta;
	private String pbdbodega;

	// Constructors

	/** default constructor */
	public ProbodegaId() {
	}

	/** full constructor */
	public ProbodegaId(String pbdempresa, String pbdproduct, String pbdcuenta,
			String pbdbodega) {
		this.pbdempresa = pbdempresa;
		this.pbdproduct = pbdproduct;
		this.pbdcuenta = pbdcuenta;
		this.pbdbodega = pbdbodega;
	}

	// Property accessors

	@Column(name = "PBDEMPRESA", unique = false, nullable = false, insertable = true, updatable = true, length = 3)
	public String getPbdempresa() {
		return this.pbdempresa;
	}

	public void setPbdempresa(String pbdempresa) {
		this.pbdempresa = pbdempresa;
	}

	@Column(name = "PBDPRODUCT", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getPbdproduct() {
		return this.pbdproduct;
	}

	public void setPbdproduct(String pbdproduct) {
		this.pbdproduct = pbdproduct;
	}

	@Column(name = "PBDCUENTA", unique = false, nullable = false, insertable = true, updatable = true, length = 20)
	public String getPbdcuenta() {
		return this.pbdcuenta;
	}

	public void setPbdcuenta(String pbdcuenta) {
		this.pbdcuenta = pbdcuenta;
	}

	@Column(name = "PBDBODEGA", unique = false, nullable = false, insertable = true, updatable = true, length = 15)
	public String getPbdbodega() {
		return this.pbdbodega;
	}

	public void setPbdbodega(String pbdbodega) {
		this.pbdbodega = pbdbodega;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProbodegaId))
			return false;
		ProbodegaId castOther = (ProbodegaId) other;

		return ((this.getPbdempresa() == castOther.getPbdempresa()) || (this
				.getPbdempresa() != null
				&& castOther.getPbdempresa() != null && this.getPbdempresa()
				.equals(castOther.getPbdempresa())))
				&& ((this.getPbdproduct() == castOther.getPbdproduct()) || (this
						.getPbdproduct() != null
						&& castOther.getPbdproduct() != null && this
						.getPbdproduct().equals(castOther.getPbdproduct())))
				&& ((this.getPbdcuenta() == castOther.getPbdcuenta()) || (this
						.getPbdcuenta() != null
						&& castOther.getPbdcuenta() != null && this
						.getPbdcuenta().equals(castOther.getPbdcuenta())))
				&& ((this.getPbdbodega() == castOther.getPbdbodega()) || (this
						.getPbdbodega() != null
						&& castOther.getPbdbodega() != null && this
						.getPbdbodega().equals(castOther.getPbdbodega())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPbdempresa() == null ? 0 : this.getPbdempresa()
						.hashCode());
		result = 37
				* result
				+ (getPbdproduct() == null ? 0 : this.getPbdproduct()
						.hashCode());
		result = 37 * result
				+ (getPbdcuenta() == null ? 0 : this.getPbdcuenta().hashCode());
		result = 37 * result
				+ (getPbdbodega() == null ? 0 : this.getPbdbodega().hashCode());
		return result;
	}

}